package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.ContactDao;
import com.kaishengit.entity.Contact;
import com.kaishengit.util.GetTime;

public class ContactService {
	ContactDao dao = new ContactDao();
	public List<Contact> findAll(String pid) {
		return dao.findAll(pid);
		
	}
	public void insert(String name, String company, String mobile, String tel,
			String email, String address, String website, String weibo,
			String dec,String pid) {
		Contact c = new Contact();
		c.setC_id(GetTime.getTime());
		c.setC_address(address);
		c.setC_company(company);
		c.setC_name(name);
		c.setC_mobile(mobile);
		c.setC_tel(tel);
		c.setC_email(email);
		c.setC_website(website);
		c.setC_weibo(weibo);
		c.setPid(pid);
		c.setC_introduct(dec);
		dao.insert(c);
		
	}
	public Contact findById(String cid) {
		
		return dao.findById(cid);
	}
	

}
